package javaVersion.learn.streamProcess;

import javaVersion.pojo.Pro5_Stream_User;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction;

/**
 * @author Wincoma
 * @date 2020/7/19 22:17
 * @description Flink加载MySQL数据源
 */
public class Pro5_StreamFromMySQL {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment senv = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<Pro5_Stream_User> mysqlDataStream = senv.addSource(new Pro5_MySQLSource());
        mysqlDataStream.print();
        senv.execute();
    }
}
